import axios from 'axios'

export function testAxios (url, data, way) {
  console.log(url)
  if (way === 'post') {
    return axios.post(url, data).then((res) => {
      return Promise.resolve(res.data)
    })
  } else {
    return axios.get(url, data).then((res) => {
      return Promise.resolve(res.data)
    })
  }
}
